From: verdre Date: Tue, 17 Apr 2018 12:30:05 +0000 (+0200) Subject: loginDialog: Ensure timed login indicator is hidden on key presses X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2~5^2~100 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d7aba2dece6fdcd9d1fb5e73985d3474f30046cc;p=gnome-shell.git loginDialog: Ensure timed login indicator is hidden on key presses The timed login feature currently cancels the timed login operation when a user presses a key but, oddly, only hides the indicator when the user releases the key. This means that if a user holds down a key that doesn't key repeat, the timed login indicator will continue to run after the timed login operation is cancelled. This commit address the problem by ensuring the timed login indicator is hidden on any key press event, at the same time the timed login operation is canceled. --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 4a93545af..3470bf749 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -1073,18 +1073,13 @@ var LoginDialog = new Lang.Class({ _onTimedLoginRequested(client, userName, seconds) { this._startTimedLogin(userName, seconds); + // Restart timed login on user interaction global.stage.connect('captured-event', (actor, event) => { if (this._timedLoginDelay == undefined) return Clutter.EVENT_PROPAGATE; if (event.type() == Clutter.EventType.KEY_PRESS || event.type() == Clutter.EventType.BUTTON_PRESS) { - if (this._timedLoginBatch) { - this._timedLoginBatch.cancel(); - this._timedLoginBatch = null; - } - } else if (event.type() == Clutter.EventType.KEY_RELEASE || - event.type() == Clutter.EventType.BUTTON_RELEASE) { this._resetTimedLogin(); }